package ch03.iphone;

import net.sf.cglib.proxy.Enhancer;

public class IntermediaryCglibProxyFactory {
    private static InrwemediaryMethodInterceptor callback=new InrwemediaryMethodInterceptor();

    public static <T> T create(Class<T> targett){
        Enhancer enhance=new Enhancer();
        enhance.setCallback(callback);
        enhance.setSuperclass(targett);
        return (T) enhance.create();
    }

}
